package com.sokal.easycare.modules.order.entity.item;

import org.hibernate.validator.constraints.Length;

import com.sokal.easycare.common.persistence.DataEntity;

/**
 * order itemEntity
 * 
 * @author nibo
 * @version 2017-03-16
 */
public class UserOrderItem extends DataEntity<UserOrderItem> {
	private static final long serialVersionUID = 1L;
	private String orderItemCode; // 订单项编码
	private String orderCode; // 订单编码
	private String itemId; // 商品标识 必须
	private String serviceId; //对应服务号
	private String type; // 商品类别 1:实物,2:服务 必须3配件,4安装需求.5销售添加服务描述
	private String num; // 数量 必须
	private String price; // 金额
	private String unitPrice; // 单价金额
	private String commodityItemCode; //商品订单项
	private String measure ; //面积
	private String apartmentLayout ; //户型
	private String demandType ; //需求类型
	private String comments ; //备注
	private String oldOrderCode ; //备注
	private int assign ; //0,未指派,1:已指派
	private Object offerPackData;// 商品

	public String getPrice() {
		return price;
	}

	public String getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(String unitPrice) {
		this.unitPrice = unitPrice;
	}

	public String getCommodityItemCode() {
		return commodityItemCode;
	}

	public int getAssign() {
		return assign;
	}

	public void setAssign(int assign) {
		this.assign = assign;
	}

	public void setCommodityItemCode(String commodityItemCode) {
		this.commodityItemCode = commodityItemCode;
	}

	public String getServiceId() {
		return serviceId;
	}

	public void setServiceId(String serviceId) {
		this.serviceId = serviceId;
	}

	public void setPrice(String price) {
		this.price = price;
	}

	public UserOrderItem() {
		super();
	}

	public UserOrderItem(String orderItemCode) {
		this.orderItemCode = orderItemCode;
	}

	@Length(min = 1, max = 255, message = "订单项编码长度必须介于 1 和 255 之间")
	public String getOrderItemCode() {
		return orderItemCode;
	}

	public void setOrderItemCode(String orderItemCode) {
		this.orderItemCode = orderItemCode;
	}

	@Length(min = 1, max = 255, message = "订单编码长度必须介于 1 和 255 之间")
	public String getOrderCode() {
		return orderCode;
	}

	public void setOrderCode(String orderCode) {
		this.orderCode = orderCode;
	}

	public String getItemId() {
		return itemId;
	}

	public void setItemId(String itemId) {
		this.itemId = itemId;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getNum() {
		return num;
	}

	public void setNum(String num) {
		this.num = num;
	}

	public Object getOfferPackData() {
		return offerPackData;
	}

	public void setOfferPackData(Object offerPackData) {
		this.offerPackData = offerPackData;
	}

	public String getMeasure() {
		return measure;
	}

	public void setMeasure(String measure) {
		this.measure = measure;
	}

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	public String getOldOrderCode() {
		return oldOrderCode;
	}

	public void setOldOrderCode(String oldOrderCode) {
		this.oldOrderCode = oldOrderCode;
	}

	public String getApartmentLayout() {
		return apartmentLayout;
	}

	public void setApartmentLayout(String apartmentLayout) {
		this.apartmentLayout = apartmentLayout;
	}

	public String getDemandType() {
		return demandType;
	}

	public void setDemandType(String demandType) {
		this.demandType = demandType;
	}

	@Override
	public String toString() {
		return "UserOrderItem [orderItemCode=" + orderItemCode + ", orderCode=" + orderCode + ", itemId=" + itemId
				+ ", type=" + type + ", num=" + num + ", price=" + price + "]";
	}

}